//
//  WDSigmobDelegateManager.h
//  WDSigmob
//
//  Created by little People on 2023/7/26.
//

#import <Foundation/Foundation.h>
#import <WindMillSDK/WindMillSDK.h>
#import <WindMillSDK/WindMillRewardVideoAd.h>
#import <WindMillSDK/WindMillIntersititialAd.h>
#import <WindMillSDK/WindMillBannerView.h>
NS_ASSUME_NONNULL_BEGIN

@protocol WDSigmobAllDelegate <NSObject>

- (void)WDSigmobConfig:(NSString *)userId;

#pragma mark RewardVideo delegate

//广告是否有效
//ready：YES有效
- (void)WDSigmobRewardAdReady:(BOOL)ready;

/// 广告跳过回调
/// - Parameter rewardVideoAd: WindMillRewardVideoAd 实例对象
- (void)WDSigmobRewardVideoAdDidClickSkip:(WindMillRewardVideoAd *)rewardVideoAd;

/// 广告加载成功
/// - Parameter rewardVideoAd: WindMillRewardVideoAd 实例对象
- (void)WDSigmobRewardVideoAdDidLoad:(WindMillRewardVideoAd *)rewardVideoAd;

//广告开始展示
//- rewardVideoAd: WindMillRewardVideoAd 实例对象
- (void)WDSigmobRewardAdShow:(nonnull WindMillRewardVideoAd *)rewardVideoAd;

//广告展示失败
/// - Parameters:
///   - rewardVideoAd: WindMillRewardVideoAd 实例对象
///   - error: 具体错误信息
- (void)WDSigmobRewardVideoAdDidShowFailed:(WindMillRewardVideoAd *)rewardVideoAd error:(NSError *)error;

/// 广告获得激励时回调
/// - Parameters:
///   - rewardVideoAd: WindMillRewardVideoAd 实例对象
///   - reward: 激励信息
- (void)WDSigmobRewardVideoAd:(nonnull WindMillRewardVideoAd *)rewardVideoAd reward:(nonnull WindMillRewardInfo *)reward;

/// 广告关闭回调
/// - Parameter rewardVideoAd: WindMillRewardVideoAd 实例对象
- (void)WDSigmobRewardVideoDelegateWithClose:(WindMillRewardVideoAd *)rewardVideoAd;

/// 广告视频播放完成或者视频播放出错
/// - Parameters:
///   - rewardVideoAd: WindMillRewardVideoAd 实例对象
///   - error: 具体错误信息
- (void)WDSigmobRewardVideoAdDidPlayFinish:(WindMillRewardVideoAd *)rewardVideoAd didFailWithError:(NSError *)error;

#pragma mark interstitital delegate

- (void)WDSigmobIntersititialAdReady:(BOOL)ready;

/**
 This method is called when video ad is clicked skip button.
 */
- (void)WDSigmobIntersititialAdDidClickSkip:(WindMillIntersititialAd *)intersititialAd;

//广告开始展示
//- intersititialAd: WindMillIntersititialAd 实例对象
- (void)WDSigmobIntersititialAdShow:(nonnull WindMillIntersititialAd *)intersititialAd;

//广告展示失败
/// - Parameters:
///   - intersititialAd: WindMillIntersititialAd 实例对象
///   - error: 具体错误信息
- (void)WDSigmobIntersititialAdDidShowFailed:(WindMillIntersititialAd *)intersititialAd error:(NSError *)error;

/// 广告关闭回调
/// - Parameter intersititialAd: WindMillIntersititialAd 实例对象
- (void)WDSigmobIntersititialAdDelegateWithClose:(WindMillIntersititialAd *)intersititialAd;

/// 广告视频播放完成或者视频播放出错
/// - Parameters:
///   - intersititialAd: WindMillIntersititialAd 实例对象
///   - error: 具体错误信息
- (void)WDSigmobIntersititialAdDidPlayFinish:(WindMillIntersititialAd *)intersititialAd didFailWithError:(NSError *)error;

#pragma mark banner delegate

- (void)WDSigmobBannerAdShow:(nonnull WindMillBannerView *)bannerAd;

/// 广告关闭回调
/// - Parameter bannerAd: WindMillBannerView 实例对象
- (void)WDSigmobBannerAdDelegateWithClose:(WindMillBannerView *)bannerAd;

@end
@interface WDSigmobDelegateManager : NSObject
+ (instancetype)manager;
@property (nonatomic, weak) id<WDSigmobAllDelegate> delegate;
@end

NS_ASSUME_NONNULL_END
